package com.abc.controller;

import com.abc.entity.Jiaoshi;
import com.abc.service.JiaoshiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class JiaoshiController {
    @Autowired
    private JiaoshiService jiaoshiService;
    @RequestMapping(value = "/addJiaoshi")
    @ResponseBody
    public String addJiaoshi(Jiaoshi jiaoshi){
        return jiaoshiService.addJiaoshi(jiaoshi);
    }
    @RequestMapping(value = "/findAllJiaoshi")
    @ResponseBody
    public List<Jiaoshi> findAllJiaoshi(){
        return jiaoshiService.findAllJiaoshi();
    }



}
